1. Field of the Invention
The present invention generally relates to image processing, and specifically, a method and a system for updating a background model based on depth.
2. Description of the Related Art
Background modeling (and subsequent foreground division) is very important in detection and positioning of an object. However, there is interference and disturbance in the process of background modeling. As an important factor, a global or local illumination change, such as (but not limited to) turn-on or turn-off of a lamp for controlling an office area, temporarily covering of a lamp and opening or closing of a curtain, may lead to false foreground pixels. For example, in a case where an illumination condition becomes bright, a region where background modeling is not originally performed may appear as a true background due to illumination increasing. However, the background modeling is not performed for such a region, thus this newly added region may be recognized as foreground pixels incorrectly. Accordingly, the background model is still not correct, and false foreground pixels are recognized incorrectly.
FIG. 1 is a schematic drawing illustrating detected wrong foreground pixels due to a sudden change of illumination situation in the prior art. As illustrated in FIG. 1, a large amount of false foreground pixels occur when illumination becomes bright. An RGB (Red, Green and Blue) image, a depth image and a foreground image on the left side are obtained under a relatively dark illumination condition, and an RGB image, a depth image and a foreground image on the right side are obtained under a relatively bright illumination condition. Most of the pixels in the circle of the drawing on the left do not have a depth value because it is difficult to identify texture on an object surface due to relatively dark illumination; accordingly, depth values of the pixels that cannot be identified are set to 0. After the light becomes bright, a lot of pixels in the circle can be identified and obtain a depth value under a condition of texture enhancement. Thus, for these pixels, a background model constructed under a dark illumination condition cannot match with depth values obtained under a relatively bright illumination condition; accordingly, a lot of false foreground pixels illustrated in the drawing on the right side occur. These false foreground pixels have a negative impact on further detection and tracking.
In fact, some methods of improving background modeling under a condition of illumination changing have been proposed. However, most of these methods is applied to a RGB image and a case where the light changes slowly, and there is no method applied to a depth image and a case where illumination changes rapidly (such as turn-on or turn-off). Therefore, the present invention has an object to solve or mitigate a problem of background modeling of a depth image due to rapid change of illumination.